refactoring
proper redirect uri construction