Implemented login with app context.

Implemented user preferences to login with given email and pw.