location replace changed to location.hash for fb login