fixing session check, login, and registration. good to go.