Added redirection and fixed syntax issue with sessionService