handling login
added login support and backbutton eventlistener