diff --git a/app/coffee/modules/auth.coffee b/app/coffee/modules/auth.coffee index a2e1df0c..def65a3c 100644 --- a/app/coffee/modules/auth.coffee +++ b/app/coffee/modules/auth.coffee @@ -37,12 +37,13 @@ class LoginPage constructor: (currentUserService, $location, $navUrls, $routeParams) -> if currentUserService.isAuthenticated() - url = $navUrls.resolve("home") - if $routeParams['next'] - url = $routeParams['next'] - $location.search('next', null) + if not $routeParams['force_login'] + url = $navUrls.resolve("home") + if $routeParams['next'] + url = decodeURIComponent($routeParams['next']) + $location.search('next', null) - $location.path(url) + $location.url(url) module.controller('LoginPage', LoginPage)