Cleaned up login; it now functions decently for a first pass.