added login function to main view controller

and weather view controller