fixed session and redirect urls, made wrapid rand