Added redirect mechanism after log in