Finally fixed redirects and sessions
Fixed redirects and sessions