fixed sessions and now authentication is working