fixes some session start issues in login, some comments(more to come) and adds redirecting to home page from restricted pages when no logged in