login fixes and source insertion fixes