I have a login class that works sort of. what i need help with is a registration/signup class to compliment the login class i've created i tried playing around with it and i just occur more errors can someone just take a look at my login and help me fix my signup class.. thanks in advance please if you see any errors that i didn't realize please point it out

import java.util.ArrayList;
import java.util.List;

import library.JSONParser;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.Settings;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class LoginScreen extends Activity implements OnClickListener{

private EditText user, pass;
private Button mSubmit, mRegister;

// Progress Dialog
    private ProgressDialog pDialog;

    // JSON parser class
    JSONParser jsonParser = new JSONParser();

    //php login script location:

    //localhost :
    //testing on your device
    //put your local ip instead,  on windows, run CMD > ipconfig
    //or in mac's terminal type ifconfig and look for the ip under en0 or en1
   // private static final String LOGIN_URL = "http://xxx.xxx.x.x:1234/android_login_api/login.php";

    //testing on Emulator:
    private static final String LOGIN_URL = "http://localhost/android_login_api/login.php";

  //testing from a real server:
    //private static final String LOGIN_URL = "http://www.yourdomain.com/android_login_api/login.php";

    //JSON element ids from response of php script:
    private static final String TAG_SUCCESS = "success";
    private static final String TAG_MESSAGE = "message";

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.login);

//setup input fields
user = (EditText)findViewById(R.id.username);
pass = (EditText)findViewById(R.id.password);

//setup buttons
mSubmit = (Button)findViewById(R.id.login);
mRegister = (Button)findViewById(R.id.register);

//register listeners
mSubmit.setOnClickListener(this);
mRegister.setOnClickListener(this);

}

@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
case R.id.login:
    login(this,user.getText().toString(),pass.getText().toString());
    break;
case R.id.register:
 Intent i = new Intent(this, SignUp.class);
 startActivity(i);
break;

default:
break;
}
}

public void login(final Context context,final String username,final String password){

  new AsyncTask<Void,Void,JSONObject>(){
   @Override
    protected void onPreExecute() {
        super.onPreExecute();
        pDialog = new ProgressDialog(LoginScreen.this);
        pDialog.setMessage("Attempting login...");
        pDialog.setIndeterminate(false);
        pDialog.setCancelable(true);
        pDialog.show();
        String username = user.getText().toString();
        String password = pass.getText().toString();
    

  }

  @Override
  protected JSONObject doInBackground(Void... params) {

      List<NameValuePair> params = new ArrayList<NameValuePair>();
      params.add(new BasicNameValuePair("username", username));
      params.add(new BasicNameValuePair("password", password));
      return  jsonParser.makeHttpRequest(LOGIN_URL, "POST", params);
  }

  @Override
  protected void onPostExecute(JSONObject response) {
      super.onPostExecute(response);
      if(pDialog!=null){
        pDialog.dismiss();
      }
      if(response!=null){
        try {
              int success = response.getInt(TAG_SUCCESS);
              if (success == 1) {
                  Log.d("Login Successful!", response.toString());
                  // save user data
                  SharedPreferences sp = context.getSharedPreferences(context.getString(R.string.app_name), MODE_PRIVATE);
                  Editor edit = sp.edit();
                  edit.putString("username", username);
                  edit.commit();

                  Intent i = new Intent(context, ReadComments.class);
                  startActivity(new Intent(Settings.ACTION_ADD_ACCOUNT));
                  ((Activity)context).finish();
              }else{
                  Toast.makeText(context, response.getString(TAG_MESSAGE), Toast.LENGTH_LONG).show();
              }
          }catch (JSONException e){
            e.printStackTrace();
          }
      }
  }
}.execute();
}}


here is my signup class they're alot of errors in it 

mport java.util.ArrayList;
import java.util.List;

import library.JSONParser;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;
import org.json.JSONException;
import org.json.JSONObject;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public  class SignUp  extends Activity implements OnClickListener{

private EditText user, pass;
private Button  mRegister;

// Progress Dialog
    private ProgressDialog pDialog;

    // JSON parser class
    JSONParser jsonParser = new JSONParser();

    //php login script

    //localhost :
    //testing on your device
    //put your local ip instead,  on windows, run CMD > ipconfig
    //or in mac's terminal type ifconfig and look for the ip under en0 or en1
   // private static final String LOGIN_URL = "http://xxx.xxx.x.x:1234/android_login_api/register.php";

    //testing on Emulator:
    private static final String LOGIN_URL = "http://localhost/android_login-api/register.php";

  //testing from a real server:
    //private static final String LOGIN_URL = "http://www.yourdomain.com/webservice/register.php";

  //ids
    private static final String TAG_SUCCESS = "success";
    private static final String TAG_MESSAGE = "message";

@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.signup);

user = (EditText)findViewById(R.id.username);
pass = (EditText)findViewById(R.id.password);

mRegister = (Button)findViewById(R.id.register);
mRegister.setOnClickListener(this);

}

@Override
public void onClick(View v) {
// TODO Auto-generated method stub

new CreateUser().execute();

}

private class CreateUser extends AsyncTask<String, String, String> {

/**
         * Before starting background thread Show Progress Dialog
         * */
boolean failure = false;

        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            pDialog = new ProgressDialog(SignUp.this);
            pDialog.setMessage("Creating User...");
            pDialog.setIndeterminate(false);
            pDialog.setCancelable(true);
            pDialog.show();
            
        }

        @Override
        protected JSONObject doInBackground(Void... params) {

           List<NameValuePair> params = new ArrayList<NameValuePair>();
           params.add(new BasicNameValuePair("username", username));
           params.add(new BasicNameValuePair("password", password));
           String username = user.getText().toString();
                 String password = pass.getText().toString();
                
           return  jsonParser.makeHttpRequest(LOGIN_URL, "POST", params);
        }

      @Override
        protected void onPostExecute(JSONObject response) {
           super.onPostExecute(response);
           if(pDialog!=null){
              pDialog.dismiss();
           }
           if(response!=null){
              try {
                   int success = response.getInt(TAG_SUCCESS);
                   if (success == 1) {
                       Log.d("User Created!", response.toString());
                       // save user data
                       SharedPreferences sp = context.getSharedPreferences(context.getString(R.string.app_name), MODE_PRIVATE);
                       Editor edit = sp.edit();
                       edit.putString("username", username);
                       edit.commit();

                       Intent i = new Intent(context, ReadComments.class);
                       context.startActivity(i);
                       ((Activity)context).finish();
                    }else{
                        Toast.makeText(context, response.getString(TAG_MESSAGE), Toast.LENGTH_LONG).show();
                    }
               }catch (JSONException e){
                  e.printStackTrace();
               }
            }
        }
      }