Have you set up your allowed callback URLs? This in combination with the redirect uri should determine where you are redirected after a successful login. Also, make sure you are not setting a different redirect url when you are calling whatever login method you are using.