Set cookie on successful login

- the cookie needs to be set otherwise the user will not stay logged in after the initial login