Added user authorization on login + logout.