changed redirect and testing authentication