Changed logout behaviour

Modified logout behaviour to be contained in the login controller