Hi Prabu, the code there leaves a lot to be desired. First, as Tim Moores said, you should not be sending the password out in the free/open like you are. You should be hashing or using HTTPS.
Second, in your OnClickListener you have code which starts a new
Thread and uses that Thread to post the login to the server and wait for the response. You then, outside the Thread, immediately get the response to do something with. This is not good. It is true that the GUI Thread should not do long running processes, and that you can't update the user interface in your background Thread - but you never wait for the process to finish before trying to use the response. Either the process is fast and you don't need the Thread, or it is not and you can not rely on it being done when you try to use the response.
A better approach to use the Android
AsyncTask. It is better suited to do just this sort of thing.
Finally, I think you have too much code in your OnClickListener, embedding it in the GUI code. You should try to move as much of it as you can out. For example, you have the SimpleHttpClient class - why not make a
String loginToServer(String userName, String password) method which does the calls for getting the URL, submitting the post, and waiting for the response, then returns the response. You have that layer so you should use it to abstract out the commands and make them as simple as possible - and you should always strive to keep as much work as possible out of your display code.
For the reference of others, here is the code I am discussing: