added specs for friedly redirect
created methods for check how can get the previous url
added correct redirects