Fixing where we go for the api and redirect