Made minor changes in Server side for checking

This is a intermediate change. This checks if we receive a connection
properly, if we are able to receive the reqest from the android app.