Added redirect uri to login params + resolved some bugs