Implement the login function

Checking the username and password through api, if pass, switch to a
dummy mainactivity, if fail, remain loginactivity with warning message
and ask for an register.