Implements stage deployement and cleans up other stage code; adds tests

what happens if a url starts with "http:/" or "http:" then you'd end up with a return url like http://http:/xyz. If this happens will the user be notified?