Sessions now working properly.

Todo: add function to verify user is logged in.