Implemented new LOGIN logic with shared preferences