Updated the login function to check the session for a user, so that Raven login need not always be called.

Signed-off-by: Gideon Farrell <me@gideonfarrell.co.uk>