Added Login to SharedPreferences and fixed code

In serach