added login and register flow