call login method when app is loaded
therefore extracted login code to own factory